package com.qf;

import com.qf.service.OrdersService;
import com.qf.service.ZufangService;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author lixu
 */
public class SpringProxyJunit {


    @Test
    public void testProxyJunit(){
        //Spring容器   SpringIOC容器   IOC：控制反转
        ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("spring-context.xml");

        ZufangService zufangService = (ZufangService) ac.getBean("zufangService");

        zufangService.zufang();

        //关闭Spring容器
        ac.close();




    }
}
